/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmMaterialAppVouch extends BasicModel<PmMaterialAppVouch> {
  djno?: string; // 申请单号
  projectno?: string; // 项目编码
  projectname?: string; // 项目名称
  createByName?: string; // 申请人名称
  u8Code?: string; // U8单据号
  pmMaterialAppVouchsList?: any[]; // 子表列表
}

export const pmMaterialAppVouchList = (params?: PmMaterialAppVouch | any) =>
  defHttp.get<PmMaterialAppVouch>({ url: adminPath + '/material/app/pmMaterialAppVouch/list', params });

export const pmMaterialAppVouchListData = (params?: PmMaterialAppVouch | any) =>
  defHttp.post<Page<PmMaterialAppVouch>>({ url: adminPath + '/material/app/pmMaterialAppVouch/listData', params });

export const pmMaterialAppVouchForm = (params?: PmMaterialAppVouch | any) =>
  defHttp.get<PmMaterialAppVouch>({ url: adminPath + '/material/app/pmMaterialAppVouch/form', params });

export const pmMaterialAppVouchSave = (params?: any, data?: PmMaterialAppVouch | any) =>
  defHttp.postJson<PmMaterialAppVouch>({ url: adminPath + '/material/app/pmMaterialAppVouch/save', params, data });

export const pmMaterialAppVouchDelete = (params?: PmMaterialAppVouch | any) =>
  defHttp.get<PmMaterialAppVouch>({ url: adminPath + '/material/app/pmMaterialAppVouch/delete', params });
